import QtQuick 2.0
import "GameLogic.js" as Logic

//ScreenMenu element used as full-screen menu to start game and quit it

Rectangle {
    id: mainMenu
    anchors.fill: parent
    color: "black"
    z:10

    Button {
        width: 150
        anchors.horizontalCenter: parent.horizontalCenter
        anchors.verticalCenter: parent.verticalCenter
        anchors.verticalCenterOffset: -30
        text: "Start Game"
        onClicked: {
            console.debug("Starting the game")
            Logic.initGame()
            mainMenu.visible = false
        }
    }
    Button {
        width: 120
        anchors.horizontalCenter: parent.horizontalCenter
        anchors.verticalCenter: parent.verticalCenter
        anchors.verticalCenterOffset: 30
        text: "Quit"
        onClicked: {
            console.debug("Quitting!")
            Qt.quit()
        }
    }
}
